package com.yubest.demo.service.impl;

import com.yubest.demo.service.JsonStrategy;

import java.util.Base64;

/**
 * 转换base64输出
 * @author huangweiyu
 * @version V1.0
 * @date 21:49
 **/
public class ToBase64JsonStrategy implements JsonStrategy {

    @Override
    public Object to(Object value) {
        return Base64.getEncoder().encodeToString((byte[]) value);
    }
}
